import { reqCategoryList,reqBannerList } from "@/api";
//小仓库
const state = {
    categoryList:[],
};
const mutations = {
    CATEGORYLIST(state,categoryList){
        state.categoryList = categoryList;
    }
};
const actions = {
    async categoryList({commit}){
        let result = await reqCategoryList();
        if(result.code == 200){
            commit("CATEGORYLIST",result.data.slice(0,15));
        }
    },
    async getBannerList(){
        let e = await reqBannerList();
        console.log(e)
    }
};
const getters = {};

export default {
    state,
    mutations,
    actions,
    getters
}